<extend name="Public/common"/>
<block name="othercss">
</block>
<block name="header">
<div class="header">
    <div class="clearfix box">
        <!--<a class="save">保存</a>-->
        <a class="return" href="javascript:history.go(-1)"><i class="return-icon"></i></a>
        <h2>消息通知</h2>
    </div>
</div>
</block>
<block name="body">
<div class="container pt50">
    <ul class="messages_list">
    <empty name="list"> <div style="margin-top:50px; text-align:center;">暂无消息</div></empty>
                   
       <foreach name="list" item="item">
        <li>
            <a class="clearfix"  <if condition="$item['url'] neq ''">href="{$item.url}"</if>>
                <div class="mess-img">
                    <img src="{$theme_path}/images/icon_mess.jpg" width="100%"/>
                </div>
                <div class="xiaoxi">
                    <div class="clearfix">
                        <div class="date">{$item.create_time}</div>
                        <div class="title">{$item.title}</div>
                    </div>
                    <div class="ones">{$item.detail|trim_textarea}</div>
                </div>
            </a>
        </li>
        </foreach>
    </ul>
    <div class="pagetion">
      {$page}
     </div>
</div>
</block>

<block name="footer"></block>
<block name="otherjs">
 <script type="text/javascript">
 $(function(){
	 var url_del_message = "{:urlrotue('Member/message_del')}"
	 
   $('.close').on('click',function(){
	   var that = $(this)
	   var id = that.attr('data-id');
	  layer.confirm('确定删除该消息？', {
      btn: ['确认','取消'] //按钮
        }, function(){
		
	  $.ajax({
        url: url_del_message + '?id=' + id,
        cache: false,
        success: function(obj) {
            if (obj.status == 'success') {
				layer.msg('删除成功!', {icon: 1});
				that.parent().parent().remove()
            } else {
				
				layer.msg('删除消息出错!', {icon: 5});
            }
        }
    })
      	layer.closeAll();
		
      }, function(){
		  
        });   
	})
  })
 </script>

</block>


